home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Standards 1994 January / InfoMagic Standards - January 1994.iso / inet / scc / 9320 < prev    next >
Text File  |  1993-11-05  |  14KB  |  311 lines

  1.  
  2. **************************************************************************
  3. Security Bulletin 9320                  DISA Defense Communications System
  4. November 5, 1993            Published by: DDN Security Coordination Center
  5.                                       (SCC@NIC.DDN.MIL)   1-(800) 365-3642
  6.  
  7.                         DEFENSE  DATA  NETWORK
  8.                           SECURITY  BULLETIN
  9.  
  10.   The DDN SECURITY BULLETIN is distributed by the DDN SCC (Security
  11.   Coordination Center) under DISA contract as a means of communicating
  12.   information on network and host security exposures, fixes, and concerns
  13.   to security and management personnel at DDN facilities.  Back issues may
  14.   be obtained via FTP (or Kermit) from NIC.DDN.MIL [192.112.36.5]
  15.   using login="anonymous" and password="guest".  The bulletin pathname is
  16.   scc/ddn-security-yynn (where "yy" is the year the bulletin is issued
  17.   and "nn" is a bulletin number, e.g. scc/ddn-security-9302).
  18. **************************************************************************
  19. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  20. !                                                                       !
  21. !     The following important  advisory was  issued by the Computer     !
  22. !     Emergency Response Team (CERT)  and is being relayed unedited     !
  23. !     via the Defense Information Systems Agency's Security             !
  24. !     Coordination Center  distribution  system  as a  means  of        !
  25. !     providing  DDN subscribers with useful security information.      !
  26. !                                                                       !
  27. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  28. =============================================================================
  29. CA-93:16                         CERT Advisory
  30.                                November 4, 1993
  31.                              Sendmail Vulnerability
  32. -----------------------------------------------------------------------------
  33. The CERT Coordination Center is working on eliminating a vulnerability in 
  34. sendmail(8). This vulnerability potentially affects all systems running 
  35. sendmail. 
  36.  
  37. CERT is working with the vendor community to address this vulnerability.  At 
  38. this time, there are no known patches available for any vendor implementation 
  39. that fully address this vulnerability.  Until there is complete vendor 
  40. information, CERT recommends that all implementations of sendmail be 
  41. considered susceptible.
  42.  
  43. This advisory supersedes the sendmail portion of the CERT advisory (CA-93:15) 
  44. of October 21, 1993.
  45.  
  46. CERT will continue to work with the vendors and will alert the community
  47. when patches become available.
  48.  
  49. Included with this advisory is an appendix describing tips that can be used 
  50. by system administrators who are concerned about the possible exploitation 
  51. of this vulnerability at their site.
  52.  
  53. -----------------------------------------------------------------------------
  54.  
  55. I.   Description
  56.  
  57.      A vulnerability exists in most versions of sendmail that allows
  58.      unauthorized remote or local users to execute programs as any system
  59.      user other than root.
  60.  
  61.      This vulnerability affects the final destination sendmail host
  62.      and can be exploited through an intermediate mail machine.  Therefore,
  63.      all sendmail recipient machines within a domain are potentially 
  64.      vulnerable.
  65.  
  66.  
  67. II.  Impact
  68.      
  69.      Anyone (remote or local) can execute programs on the affected hosts
  70.      as any userid other than root.
  71.  
  72.  
  73. III. Approaches
  74.  
  75.      CERT suggests three possible approaches to this problem.  Although
  76.      these approaches address all known aspects of this vulnerability,
  77.      they are suggested only until vendor patches for this sendmail
  78.      vulnerability are available.
  79.  
  80.      Familiarity with sendmail and its installation and configuration,
  81.      is recommended before implementing these modifications.
  82.   
  83.      In order to protect your entire site it is necessary to apply the selected
  84.      approach to *ALL* systems running sendmail at the site, and not just 
  85.      the mail hub.
  86.  
  87.      A.  Approach 1
  88.  
  89.          This approach involves modifying the sendmail configuration
  90.          to restrict the sendmail program mailer facility.
  91.  
  92.          To restrict sendmail's program mailer facility, obtain
  93.          and install the sendmail restricted shell program (smrsh 1.2) 
  94.          by Eric Allman (the original author of sendmail), following the 
  95.          directions included with the program. 
  96.   
  97.          1.  Where to obtain the program
  98.   
  99.              Copies of this program may be obtained via anonymous FTP from
  100.              info.cert.org, in the /pub/tools/smrsh directory, or via 
  101.              anonymous FTP from ftp.uu.net in the /pub/security/smrsh
  102.              directory.
  103.  
  104.              Checksum information:
  105.  
  106.                                BSD Sum
  107.              30114 5 README
  108.              25757 2 smrsh.8
  109.              46786 5 smrsh.c
  110.  
  111.                              System V Sum
  112.              56478 10 README
  113.              42281 4 smrsh.8
  114.              65517 9 smrsh.c
  115.  
  116.                              MD5 Checksum
  117.              MD5 (README) = fc4cf266288511099e44b664806a5594
  118.              MD5 (smrsh.8) = 35aeefba9714f251a3610c7b1714e355
  119.              MD5 (smrsh.c) = d4822ce7c273fc8b93c68e39ec67739c
  120.  
  121.  
  122.          2.  Impacts of this approach 
  123.   
  124.              While this approach allows a site to specify which programs
  125.              can be run by sendmail (e.g. vacation(1)), attempts to invoke 
  126.              programs that are not included in the allowed set, or attempts
  127.              using shell meta-characters (see smrsh program listing for a 
  128.              complete set of disallowed characters), will fail, resulting in 
  129.              log output to the syslog(3) facility.  Programs that are specified 
  130.              in a site's /etc/aliases file should be considered for inclusion 
  131.              in the allowable program list.
  132.   
  133.              Since .forward files allow user-specified programs to be 
  134.              run by sendmail, a survey of the contents of the system's 
  135.              .forward files may be required to prevent failure to deliver
  136.              user mail.
  137.   
  138.              *** WARNING ***************************************************
  139.              * It is very important that sites *NOT* include interpreter   * 
  140.              * programs (e.g. /bin/sh, /bin/csh, /bin/perl, /bin/uudecode, *
  141.              * /bin/sed, ...) in the list of allowed programs.             *
  142.              ***************************************************************
  143.  
  144.      B.  Approach 2
  145.  
  146.          Like approach 1, this approach involves modifying the sendmail
  147.          configuration.  However, this approach completely disables the 
  148.          sendmail program mailer facility.  This is a drastic, but quick 
  149.          action that can be taken while a site installs one of the
  150.          other suggestions.  Before implementing this approach, save a copy
  151.          of the current sendmail configuration file.
  152.  
  153.          To implement this approach edit the sendmail.cf file:
  154.  
  155.          change from:
  156.          Mprog,  P=/bin/sh,      F=slFDM,        S=10,   R=20,   A=sh -c $u
  157.  
  158.          to:
  159.          Mprog, P=/bin/false,    F=,     S=10,   R=20,   A=
  160.  
  161.          Any changes to the sendmail.cf file will require that the 
  162.          sendmail process be restarted to ensure that the new configuration
  163.          is used. See item 3 in Appendix A for more details.
  164.  
  165.          1.  Impacts of this approach
  166.  
  167.              Attempts to invoke programs through sendmail will not
  168.              be successful.
  169.  
  170.      C.  Approach 3
  171.  
  172.          To the best of our knowledge, Eric Allman's public domain 
  173.          implementation of sendmail, sendmail 8.6.4, does not appear to
  174.          be susceptible to this vulnerability.  A working solution would 
  175.          then be to replace a site's sendmail, with sendmail 8.6.4.
  176.  
  177.          1.  Where to obtain the program
  178.  
  179.              Copies of this version of sendmail may be obtained via
  180.              anonymous FTP from ftp.cs.berkeley.edu in the 
  181.              /ucb/sendmail directory.
  182.  
  183.              Checksum information:
  184.  
  185.                                 BSD Sum 
  186.              sendmail.8.6.4.base.tar.Z:      07718 428
  187.              sendmail.8.6.4.cf.tar.Z:        28004 179
  188.              sendmail.8.6.4.misc.tar.Z:      57299 102
  189.              sendmail.8.6.4.xdoc.tar.Z:      33954 251
  190.  
  191.                              System V Sum
  192.              64609 856 sendmail.8.6.4.base.tar.Z
  193.              42112 357 sendmail.8.6.4.cf.tar.Z
  194.              8101 203 sendmail.8.6.4.misc.tar.Z
  195.              50037 502 sendmail.8.6.4.xdoc.tar.Z
  196.  
  197.                              MD5 Checksum
  198.              MD5 (sendmail.8.6.4.base.tar.Z) = 59727f2f99b0e47a74d804f7ff654621
  199.              MD5 (sendmail.8.6.4.cf.tar.Z) = cb7ab7751fb8b45167758e9485878f6f
  200.              MD5 (sendmail.8.6.4.misc.tar.Z) = 8eaa6fbe9e9226667f719af0c1bde755
  201.              MD5 (sendmail.8.6.4.xdoc.tar.Z) = a9da24e504832f21a3069dc2151870e6
  202.  
  203.  
  204.          2.  Impacts of this workaround
  205.  
  206.              Depending upon the currently installed sendmail program, 
  207.              switching to a different sendmail may require significant 
  208.              effort for the system administrator to become familiar with 
  209.              the new program.  The site's sendmail configuration file 
  210.              may require considerable modification in order to provide 
  211.              existing functionality. In some cases, the site's sendmail 
  212.              configuration file may be incompatible with the sendmail 8.6.4 
  213.              configuration file.
  214.  
  215.  
  216. ---------------------------------------------------------------------------
  217. The CERT Coordination Center wishes to thank the members of the following
  218. response teams for their assistance in analyzing and testing both the 
  219. problem and the solutions: SERT, ASSIST, CIAC, and DFN-CERT.  CERT would
  220. especially like to thank Eric Allman, Matt Blaze, Andy Sherman, Gene Spafford,
  221. Tim Seaver, and many others who have provided technical assistance with 
  222. this effort.
  223. ---------------------------------------------------------------------------
  224.  
  225. If you believe that your system has been compromised, contact the CERT
  226. Coordination Center or your representative in Forum of Incident
  227. Response and Security Teams (FIRST).
  228.  
  229. Internet E-mail: cert@cert.org
  230. Telephone: 412-268-7090 (24-hour hotline)
  231.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  232.            and are on call for emergencies during other hours.
  233.  
  234. CERT Coordination Center
  235. Software Engineering Institute
  236. Carnegie Mellon University
  237. Pittsburgh, PA 15213-3890
  238.  
  239. Past advisories, information about FIRST representatives, and other
  240. information related to computer security are available via anonymous FTP
  241. from info.cert.org.
  242.  
  243.  
  244.  
  245. Appendix A
  246.  
  247. This appendix describes tips that can be used by system administrators
  248. who are concerned about the possible exploitation of this vulnerability at 
  249. their site.
  250.  
  251.  
  252. There are two actions that can be taken by system administrators to try
  253. to detect the exploitation of this vulnerability at their sites. 
  254.  
  255.   - Examine all bounced mail to look for unusual occurrences.
  256.   - Examine syslog files for unusual occurrences of "|" characters
  257.  
  258. In order to do this, sendmail must be configured to direct bounced mail to 
  259. the postmaster (or other designated person who will examine the bounced mail). 
  260. Sendmail must also be configured to provide adequate logging.  
  261.  
  262. 1)  To direct bounced mail to the postmaster, place the following entry in 
  263.     the options part of the general configuration information section of 
  264.     the sendmail.cf file. 
  265.  
  266.     # Cc my postmaster on error replies I generate
  267.     OPpostmaster
  268.  
  269. 2)  To set sendmail's logging level, place the following entry in the options 
  270.     part of the general configuration information section of the sendmail.cf 
  271.     file. Note that the logging level should be 9 or higher in order to provide
  272.     adequate logging.
  273.  
  274.     # log level
  275.     OL9
  276.  
  277. 3)  Once changes have been made in the sendmail configuration file,
  278.     it will be necessary to kill all existing sendmail processes,
  279.     refreeze the configuration file (if needed - see the note below), 
  280.     and restart the sendmail program.
  281.  
  282.     Here is an example from SunOS 4.1.2:
  283.  
  284.     As root:
  285.  
  286.     # /usr/bin/ps -aux | /usr/bin/grep sendmail
  287.     root 130  0.0  0.0  168    0 ?  IW   Oct  2  0:10 /usr/lib/sendmail -bd -q
  288.     # /bin/kill -9 130                (kill the current sendmail process)
  289.     # /usr/lib/sendmail -bz           (create the configuration freeze file)
  290.     # /usr/lib/sendmail -bd -q30m     (run the sendmail daemon)
  291.  
  292.  
  293. **Note: Some sites do not use frozen configuration files and some do. If
  294.   your site is using frozen configuration files, there will be a file
  295.   named sendmail.fc in the same directory as the sendmail configuration
  296.   file (sendmail.cf). 
  297.  
  298. ****************************************************************************
  299. *                                                                          *
  300. *    The point of contact for MILNET security-related incidents is the     *
  301. *    Security Coordination Center (SCC).                                   *
  302. *                                                                          *
  303. *               E-mail address: SCC@NIC.DDN.MIL                            *
  304. *                                                                          *
  305. *               Telephone: 1-(800)-365-3642                                *
  306. *                                                                          *
  307. *    NIC Help Desk personnel are available from 7:00 a.m.-7:00 p.m. EST,   *
  308. *    Monday through Friday except on federal holidays.                     *
  309. *                                                                          *
  310. ****************************************************************************
  311.